/**
 * Created with IntelliJ IDEA.
 * Description:
 * https://gitee.com/li--jiaqiang/java-test.git
 * git pull
 * git pull origin master
 * git pull origin master --allow-unrelated-histories
 * User: 86187
 * Date: 2022-04-23
 * Time: 20:46
 */

//Scanner scan = new Scanner(System.in);

import java.util.Scanner;

public class TestDemo4 {

    public static void main(String[] args) {
        int n = 25;
        int m = 15;
        int answer = n;

        while(n % m != 0)
        {
            answer = n % m;
            n = m;
            m = answer;
        }
        System.out.println(answer);
    }
}
